/*package main

import (
	"log"

	"github.com/gin-gonic/gin"
)

type User struct {
	Username string   `form:"username"`
	Password string   `form:"password"`
	Hobby    []string `form:"hobby"`
	Gender   string   `form:"gender"`
	ity      string   `form:"city"`
}

func Register(c *gin.Context) {
	var user User
	c.ShouldBind(&user)
	c.String(200, "User:%s", user)
}

func GoRegister(c *gin.Context) {
	c.HTML(200, "register.html", nil)
}

type User1 struct {
	Username string   `form:"username"`
	Password string   `form:"password"`}

func TestGetBind(c *gin.Context) {
		var user User1
		err :=c.ShouldBind(&user)
		if err != nil{
			log.Fatal(err)
		}
		c.String(200, "User:%s", user)
	}

	type User2 struct {
		Username string   `uri:"username"`
		Password string   `uri:"password"`}
	
	func TestGetBind2(c *gin.Context) {
			var user User2
			err :=c.ShouldBindUri(&user)
			if err != nil{
				log.Fatal(err)
			}
			c.String(200, "User:%s", user)
		}


func main() {
	e := gin.Default()
	e.LoadHTMLGlob("templates/*")

	e.POST("/register", Register)
	e.GET("/register", GoRegister)
//http://localhost:8010/testGetBind?username=yyqx&password=123
    e.GET("/testGetBind",TestGetBind)
//http://localhost:8010/testGetBind/yyqx/123
    e.GET("/testGetBind/:username/:password",TestGetBind2)
	e.Run(":8010")
}
